(ldap-search-internal): Handle file URLs with drive
authorJason Rumney <jasonr@gnu.org>
Thu, 11 Mar 2004 21:09:31 +0000 (21:09 +0000)
committerJason Rumney <jasonr@gnu.org>
Thu, 11 Mar 2004 21:09:31 +0000 (21:09 +0000)
letters on DOS/Windows.

lisp/net/ldap.el

index d1a580f9c5400cdd073f05e39fc322439285b488..93802d5744a93c67ee8944ba3e3f4b00fb2b3713 100644 (file)
@@ -582,6 +582,11 @@ an alist of attribute/value pairs."
          (while (looking-at "^\\(\\w*\\)[=:\t ]+\\(<[\t ]*file://\\)?\\(.*\\)$")
            (setq name (match-string 1)
                  value (match-string 3))
+            ;; Need to handle file:///D:/... as generated by OpenLDAP
+            ;; on DOS/Windows as local files.
+            (if (and (memq system-type '(windows-nt ms-dos))
+                     (eq (string-match "/\\(.:.*\\)$" value) 0))
+                (setq value (match-string 1 value)))
            ;; Do not try to open non-existent files
            (if (equal value "")
                (setq value " ")